1. Field of the Invention
The present invention relates to a numerical controller and more particularly to a numerical controller that has a function of switching between a right-handed coordinate system and a left-handed coordinate system in a machining program.
2. Description of the Related Art
In a machine tool, when a position or a moving direction of a tool is specified with a coordinate, either right-handed coordinate system or left-handed coordinate system is used as the coordinate system for the coordinates (see Seiken Yamagishi, “Illustrated Introduction to NC Machine Tools”, Tokyo Denki University, the sixth impression of the first edition, pp. 92-105, 1986).
Differences between the right-handed coordinate system and the left-handed coordinate system will be described by using FIG. 5.
The first difference between the right-handed coordinate system and the left-handed coordinate system is as follows. For linear interpolation of a control axis that supports the tool, when control is performed in the right-handed coordinate system to move the tool in the positive direction of an X axis, the tool moves to the right as an XY plane with the X axis as a horizontal axis and a Y axis as a vertical axis is viewed from the positive direction of a Z axis. On the other hand, when control is performed in the left-handed coordinate system to move the tool in the positive direction of the X axis, the tool moves to the left as the XY plane with the X axis as the horizontal axis and the Y axis as the vertical axis is viewed from the positive direction of the Z axis.
The second difference between the right-handed coordinate system and the left-handed coordinate system is as follows. For circular interpolation of the control axis that supports the tool, when clockwise circular interpolation is performed in the right-handed coordinate system, the tool moves clockwise as the XY plane with the X axis as the horizontal axis and the Y axis as the vertical axis is viewed from the positive direction of the Z axis. On the other hand, when clockwise circular interpolation is performed in the left-handed coordinate system, the tool moves counterclockwise as the XY plane with the X axis as the horizontal axis and the Y axis as the vertical axis is viewed from the positive direction of the Z axis. There is also a similar difference between the coordinate systems in rotation direction of coordinate rotation.
The third difference between the right-handed coordinate system and the left-handed coordinate system is as follows. For issue of a tool diameter compensation instruction for the control axis that supports the tool, when the instruction is issued in the right-handed coordinate system such that a compensation is made to the right side with respect to the traveling direction of the control axis, a moving path of the tool is corrected to the right side as the XY plane with the X axis as the horizontal axis and the Y axis as the vertical axis is viewed from the positive direction of the Z axis. On the other hand, when the instruction is issued in the left-handed coordinate system such that a compensation is made to the right side with respect to the traveling direction of the control axis, a moving path of the tool is corrected to the left side as the XY plane with the X axis as the horizontal axis and the Y axis as the vertical axis is viewed from the positive direction of the Z axis.
Some types of machine tools operate the control axis with the right-handed coordinate system, while others operate the control axis with the left-handed coordinate system. However, in numerical controllers, a position, a moving direction, or the like of the control axis is typically specified with the right-handed coordinate system, and there have been no numerical controllers that support the left-handed coordinate system.
Therefore, when a user attempts to control a machine tool in the left-handed coordinate system by using a conventional numerical controller, the user has to create a machining program by taking into consideration the differences between the right-handed coordinate system and the left-handed coordinate system.
For example, assume that a user programs control for performing, on a machine in the left-handed coordinate system, machining which is similar to the machining to be performed for a workpiece by an instruction “G02 X10.0 Y0 R10.0” in a right-handed coordinate system program shown in FIG. 6A. The user has to envision which path the control axis will take when the right-handed coordinate system is converted to the left-handed coordinate system. The user has also to change G02 (clockwise circular interpolation instruction) to G03 (counterclockwise circular interpolation instruction), and manually create an instruction “G03 X-10.0 Y0 R10.0” in which the sign of the X coordinate is inverted from positive to negative, as shown in and FIG. 6B.
Thus, because conventional numerical controllers have been configured on the premise that control functions are defined for the right-handed coordinate system, there is a problem in that the user has to create a program as an inversion of a program in the right-handed coordinate system on the user's own, resulting in a decrease in efficiency of machining program creation.
Furthermore, how programs compatible with machine tools in the left-handed coordinate system should be created is not clearly represented as guidelines, and each user has to individually conduct the study and creation of a machining program and is therefore likely to make programming mistakes, causing a reduction in machining program quality.